package com.jzo2o.foundations.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jzo2o.api.foundations.dto.response.ServeAggregationResDTO;
import com.jzo2o.common.model.PageResult;
import com.jzo2o.foundations.model.domain.Serve;
import com.jzo2o.foundations.model.dto.request.ServePageQueryReqDTO;
import com.jzo2o.foundations.model.dto.request.ServeUpsertReqDTO;
import com.jzo2o.foundations.model.dto.response.*;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 服务表 服务类
 * </p>
 *
 * @author itcast
 * @since 2023-07-03
 */
public interface IServeService<A> extends IService<Serve> {

    PageResult<ServeResDTO> findByPage(ServePageQueryReqDTO servePageQueryReqDTO);

    void batchSave(List<ServeUpsertReqDTO> serveUpsertReqDTOList);

    void updatePriceById(Long id, BigDecimal price);

    boolean removeByIdAndStatus(Long id);

    void onSale(Long id);

    void offSale(Long id);

    void onHot(Long id);

    void offHot(Long id);

    List<ServeCategoryResDTO> firstPageServeList(Long regionId);

    List<ServeAggregationSimpleResDTO> hotServeList(Long regionId);

    ServeAggregationSimpleResDTO findServeDetailById(Long id);

    List<ServeAggregationTypeSimpleResDTO> serveTypeList(Long regionId);

    List<ServeSimpleResDTO> search(String cityCode, String keyword, Long serveTypeId);

    ServeAggregationResDTO findById(Long id);
}
